<template>
  <div class="allmatch">
    <div class="rencent_list"  v-for="item in matchdata" :key="item.date">
      <div class="live_data">
        {{item.date}}
      </div>
      <div class="schedule">
        <div class="schedule-title">
          <img :src="item.match_logo" alt="">
          {{item.match_name}}
          <b>{{item.cate}}</b>
        </div>
        <div class="schedule-con" v-for="match in item.match" :key="match.matchid">
          <div class="schedule-list">
            <div class="time">
              <span>{{match.mtime}}</span>
              <div class="begined" v-if="match.status==0"></div>
              <div class="begin" v-else></div>

            </div>
            <div class="battle-team">
              <div class="team-name">
                <div class="team-head">
                  <img :src="match.teama_logo" alt="">
                </div>
                <div class="team-name">
                  {{match.teama_name}}
                </div>
              </div>
              <div class="score">
                VS
              </div>
              <div class="team-name">
                <div class="team-head">
                  <img :src="match.teamb_logo" alt="">
                </div>
                <div class="team-name">
                  {{match.teamb_name}}
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data: () => ({
    matchdata: []
  }),
  created () {
    this.getmatch()
  },
  methods: {
    async getmatch () {
      const data = await this.$axios.get('/match/matchdata')
      this.matchdata = data.data.matchList
      // console.log(this.matchdata)
    }
  }
}
</script>
<style lang="less" scoped>
.allmatch{
  .rencent_list{
    .live_data{
      font-size: 16px;
      margin-bottom: 5px;
    }
    .schedule{
      border: 1px solid #daaf54;
      .schedule-title{
        font-size: 12px;
        text-align: center;
        line-height: 24px;
        border-bottom: 1px solid #daaf54;
        img{
          width: 27px;
          height: 18px;
          margin-top: 2px;
        }
        b{
          color: #daaf54;
          font-weight: 700;
        }
      }
      .schedule-con{
        .schedule-list{
          display: flex;
          padding: 6px 5px;
          height: 70px;
          border-bottom: 1px solid #daaf54;
          .time{
            flex-basis: 95px;
            font-size: 16px;
            text-align: center;
            .begined{
              background: url(////game.gtimg.cn/images/yxzj/match/center2018/images/finish.png) no-repeat;
              background-size: cover;
              width: 68px;
              height: 24px;
              margin: 0 auto;
            }
            .begin{
              background: url(//game.gtimg.cn/images/yxzj/match/center2018/images/begin.png) no-repeat;
              background-size: cover;
              width: 68px;
              height: 24px;
              margin: 0 auto;
            }
          }
          .battle-team{
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-around;
            .team-name{
              flex-basis: 84px;
              text-align: center;
              .team-head{
                text-align: center;
                margin: 0 auto;
                img{
                  align-self: center;
                  width: 40px;
                  height: 40px;
                  background-color: #fff;
                  border-radius: 50%;
                }
              }
              .team-name{
                width: 100%;
              }
            }
            .score{
              flex: 1;
              font-size: 24px;
              text-align: center;
            }
          }
        }
      }
    }
  }
}
</style>
